#include "AboutDialog.h"
#include "ui_AboutDialog.h"

AboutDialog::AboutDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::AboutDialog)
{
    // 设置对话框属性
    //setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    setFixedSize(450, 400);
    ui->setupUi(this);

    setControlsInfo("W A S D", "F", "Esc or P");
}

AboutDialog::~AboutDialog()
{
    delete ui;
}

void AboutDialog::setControlsInfo(const QString &moveKeys,
                                  const QString &interactKey,
                                  const QString &pauseKey)
{
    ui->moveKeysLabel->setText(moveKeys);
    ui->interactKeyLabel->setText(interactKey);
    ui->pauseKeyLabel->setText(pauseKey);
}
